//
//  UIViewController+ActionSheet.swift
//  chat
//
//  Created by 崔世强 on 2018/11/6.
//  Copyright © 2018 崔世强. All rights reserved.
//

import Foundation
import UIKit

extension UIViewController {
    
    func showActionSheet(title:String?,message:String?,actions:[UIAlertAction],animated:Bool ,complite: (() -> Void)? = nil) {
        let alertController = UIAlertController(title: title, message: message, preferredStyle: .actionSheet)
        for action in actions {
            alertController.addAction(action)
        }
        self.present(alertController, animated: animated, completion: complite)
    }
}
